# _*_ coding:utf-8 _*_
import os.path

from pages.base_page import BasePage
from selenium.webdriver.common.by import By
from utils.Mouse_Actions.mouse_action import MouseActions


# pages/login_page.py,页面对象模型，子类，继承base_page,存放具体的页面属性
class UploadPage(BasePage):
    TALL_LU_BUTTON = (By.XPATH, '//span[text()="企业信息管理"]')
    TALL_BUTTON = (By.XPATH, '//span[text()="企业认证管理"]')
    TALL_BUTTON_list = (By.XPATH, '/html/body/div[2]/div/exporter-layout/div[2]/div/div/div/div/div/div[2]/div/div[1]/span/div/div[1]/div')
    TALL_UPLOAD = (By.XPATH, '//button[@title="删除文件"]')
    Tall_UPLOAD1 = (By.XPATH,'/html/body/div[2]/div/exporter-layout/div[2]/div/div/div/div/div/div[2]/div/div[1]/span/div/div/span/input')
    PAHT_UPLOAD = "../screenshots/001.png"

    def tall_lu(self):
        self.click(self.TALL_LU_BUTTON[0],self.TALL_LU_BUTTON[1],'按钮')

    def tall(self):
        self.click(self.TALL_BUTTON[0],self.TALL_BUTTON[1],'按钮')

    def tall_list(self):
        self.mouse_hover(self.TALL_BUTTON_list[0],self.TALL_BUTTON_list[1],"悬停")

    def tall_upload(self):
        self.click(self.TALL_UPLOAD[0],self.TALL_UPLOAD[1],'按钮')

    def upload(self):
        self.upload_file(self.Tall_UPLOAD1[0],self.Tall_UPLOAD1[1],self.PAHT_UPLOAD,'上传文件')
